<include file="Public/min-header" />
<div class="wrapper">
    <include file="Public/breadcrumb" />
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <nav class="navbar navbar-default">
                            <div class="pull-right navbar-form">
                                <label><a class="btn btn-block btn-primary" href="{:U('Admin/Ad/position')}">新增广告位</a></label>
                            </div>
                        </nav>
                    </div>
                    <div class="box-body">
                        <div class="row">
                            <div class="col-sm-12">
                                <table id="list-table" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
                                    <thead>
                                        <tr role="row">
                                            <th class = "text-center">广告ID</th>
                                            <th class = "text-center">广告位名称</th>
                                            <th class = "text-center">广告位宽度</th>
                                            <th class = "text-center">广告位高度</th>
                                            <th class = "text-center">广告位描述</th>
                                            <th class = "text-center">状态</th>
                                            <th class = "text-center">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <foreach name="list" item="vo" key="k">
                                            <tr role="row">
                                                <td class = "text-center">{$vo.position_id}</td>
                                                <td>{$vo.position_name}</td>
                                                <td>{$vo.ad_width}</td>
                                                <td>{$vo.ad_height}</td>
                                                <td>{$vo.position_desc}</td>
                                                <td class = "text-center">
                                                    <img width="20" height="20" src="__PUBLIC__/images/<if condition='$vo[is_open] eq 1'>yes.png<else />cancel.png</if>" onclick="changeTableVal('ad_position', 'position_id', '{$vo.position_id}', 'is_open', this)" />
                                                </td>
                                                <td>
                                                    <a class="btn btn-info" href="{:U('Admin/Ad/adList',array('pid'=>$vo['position_id']))}">查看广告</a>
                                                    <a class="btn btn-primary" href="{:U('Admin/Ad/position',array('act'=>'edit','position_id'=>$vo['position_id']))}"><i class="fa fa-pencil"></i></a>
                                                </td>
                                            </tr>
                                        </foreach>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6 text-left"></div>
                            <div class="col-sm-6 text-right">{$page}</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
</body>

</html>
